package com.next

class VehicleAuditTrail {

    Date buildTime
    //车辆出厂时间
    String projectName
    //小区名称、车辆名称
    CollateralType type
    //押品类型：住宅、车
    CollateralSubtype subtype
    //押品子类型(车辆类型)
    Double downPaymentAmount
    //首付金额
    String downPaymentSource
    //首付款来源
    Double purchaseAmount
    //购买金额
    String purchaseState
    //付款情况
    Date purchaseDate
    //买入日期
    String vehicleProvider
    //销售商名称
    String engineCode
    //发动机号
    String carframeCode
    //车架号
    String vehicleBrand
    //车辆品牌
    String vehicleLicense
    //车辆牌号
    String description
    //车辆概况
    String purpose
    //购买用途
    Date startTime
    //统计开始时间
    Date endTime
    //统计截止时间
    String registerDate
    //登记日期
    String registerAccount
    // 登记机构
    String registerUser
    //登记人
    String propertySerialNumber
    //购车合同号
    Double loanToValue = 0
    //抵押率

    Date createdDate = new Date()
    Date modifiedDate = new Date()
    User createdBy
    User modifiedBy

    static belongsTo = [opportunity: Opportunity, parent: Vehicle]

    static constraints = {
        type nullable: true, blank: true
        subtype nullable: true, blank: true
        downPaymentAmount nullable: true, blank: true
        downPaymentSource nullable: true, blank: true, maxSize: 32
        purchaseAmount nullable: true, blank: true
        purchaseState nullable: true, blank: true, maxSize: 32
        purchaseDate nullable: true, blank: true
        vehicleProvider nullable: true, blank: true, maxSize: 32
        engineCode nullable: true, blank: true, maxSize: 32
        carframeCode nullable: true, blank: true, maxSize: 32
        vehicleBrand nullable: true, blank: true, maxSize: 32
        vehicleLicense nullable: true, blank: true, maxSize: 16
        description nullable: true, blank: true, maxSize: 128

        purpose nullable: true, blank: true, maxSize: 32
        startTime nullable: true, blank: true
        endTime nullable: true, blank: true
        registerDate nullable: true, blank: true
        registerAccount nullable: true, blank: true, maxSize: 32
        registerUser nullable: true, blank: true, maxSize: 32
        buildTime nullable: true, blank: true
        propertySerialNumber nullable: true, blank: true, maxSize: 64
    }
}
